home *** CD-ROM | disk | FTP | other *** search
/ NEC SuperScript 860 Solutions / NEC SuperScript 860 Solutions.iso / internet / scripts.lib / INTERNET.SCR < prev    next >
Text File  |  1994-12-29  |  1KB  |  69 lines

  1. !
  2. !  Copyright (c) 1994
  3. !  by CompuServe Incorporated, Columbus, Ohio
  4. !
  5. !  The information in this software is subject to change without
  6. !  notice and should not be construed as a commitment by CompuServe.
  7. !
  8. !  Internet:
  9. !    Success:  returns %Success
  10. !    Failure:  saves error msg in %FailureMsg and returns %Failure
  11. !
  12. !+V
  13. ! "3.5.2"
  14. !-V
  15.  
  16. Tries = 5;
  17. Sent_Host_Name = %FALSE;
  18. on cancel goto Return_Cancel;
  19. show "Connecting to Internet";
  20. Wait_Time = 30;
  21.  
  22. Wait_Internet:
  23.     if Tries = 0 goto Internet_Failure;
  24.     wait
  25.         "Host Name"        goto Send_Host_Name,
  26.         "User ID"        goto Return_User_ID,
  27.         "OFF):"            goto Send_Baud_Rate
  28.     until Wait_Time;
  29.  
  30.     send "^M";
  31.     Wait_Time = 200;
  32.     Tries = Tries - 1;
  33.     goto Wait_Internet;
  34.  
  35. Send_Host_Name: 
  36.     if Sent_Host_Name goto Reset_Host_Name;
  37.     send "CISAGREE^M";
  38.     Sent_Host_Name = %TRUE;
  39.     Wait_Time = 200;
  40.     goto Wait_Internet;
  41.  
  42. !
  43. ! Only send CISAGREE response on 1st, 3rd, & 5th attempts
  44. ! to guard against unintended double host name prompts resulting
  45. ! from sending "^M".  On even attempts, eat the Host Name: prompt.
  46. !
  47. Reset_Host_Name:
  48.     Sent_Host_Name = %FALSE;
  49.     Tries = Tries - 1;
  50.     goto Wait_Internet;
  51.  
  52. Send_Baud_Rate:
  53.     send %BaudRate;
  54.     send "^M";
  55.     goto Return_Success;
  56.  
  57. Internet_Failure:
  58.     define %FailureMsg = "Internet not responding";
  59.     exit %Failure;
  60.  
  61. Return_Cancel:
  62.     exit %Cancel;
  63.  
  64. Return_User_ID:
  65.     send %CR;
  66.     wait until 10;
  67. Return_Success:
  68.     exit %Success;
  69.